﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NewDevice.XiWei
{
    /// <summary>
    /// 烧录状态
    /// </summary>
    public enum FlashStatus
    {
        /// <summary>
        /// 重置，烧录前切换至该状态
        /// </summary>
        Reset,

        /// <summary>
        /// 确认开始烧录
        /// </summary>
        ConfirmFlashStart,

        /// <summary>
        /// 烧录器读出数据，准备烧录
        /// </summary>
        ReadFinishedReady = 0x11,

        /// <summary>
        /// 烧录器准备 OK，可以烧录
        /// </summary>
        Ready4Flash = 0x22,

        /// <summary>
        /// 解除读保护
        /// </summary>
        UnlockProtect = 0x33,

        /// <summary>
        /// 正在擦除
        /// </summary>
        Erasing = 0x44,

        /// <summary>
        /// 擦除成功
        /// </summary>
        EraseSuccess = 0x55,

        /// <summary>
        /// 正在编程
        /// </summary>
        Programing = 0x66,

        /// <summary>
        /// 编程成功
        /// </summary>
        ProgramSuccess = 0x77,

        /// <summary>
        /// 正在校验
        /// </summary>
        Verifying = 0x88,

        /// <summary>
        /// 校验成功
        /// </summary>
        VeriftSuccess = 0x99,

        /// <summary>
        /// 连接失败
        /// </summary>
        ConnectedFailed = 0xAA,

        /// <summary>
        /// 擦除失败
        /// </summary>
        EraseFailed = 0xBB,

        /// <summary>
        /// 编程失败
        /// </summary>
        ProgramFailed = 0xCC,

        /// <summary>
        /// 校验失败
        /// </summary>
        VerifyFailed = 0xDD,

        /// <summary>
        /// 剩余烧录次数为 0
        /// </summary>
        FlashCountNone = 0xEE,

        /// <summary>
        /// 电压异常
        /// </summary>
        VoltageException = 0xFF
    }
}